package pojo.model;

public class DsModel {
	private String driver;
	private String url;
	private String user;
	private String password;
	private String dbName;

	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}

	public String getDataBaseType() {
		if ("oracle.jdbc.driver.OracleDriver".equals(this.driver)) {
			return "ORACLE";
		} else if ("com.mysql.jdbc.Driver".equals(this.driver)) {
			return "MYSQL";
		} else {
			return "";
		}
	}

	@Override
	public String toString() {
		return "DsModel [driver=" + driver + ", url=" + url + ", user=" + user + ", password=" + password + ", dbName="
				+ dbName + "]";
	}

}
